{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# baoxianzhidao_filter 说明\n",
    "0. **下载地址：** [百度网盘](https://pan.baidu.com/s/1cgYeIrJHAgb8D33H09Zc5w)\n",
    "1. **数据概览：** 8000 多条保险行业问答数据\n",
    "2. **推荐实验：** FAQ 问答系统\n",
    "3. **数据来源：** 百度知道\n",
    "4. **加工处理：**\n",
    "    1. 过滤了id、url、qid、reply_t、user字段\n",
    "    2. 对question、reply做了脱敏处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "path = 'baoxianzhidao_文件夹_所在_路径'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. baoxianzhidao_filter.csv"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 加载数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd_all = pd.read_csv(path + 'baoxianzhidao_filter.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 字段说明\n",
    "\n",
    "| 字段 | 说明 |\n",
    "| ---- | ---- |\n",
    "| title | 问题的标题 |\n",
    "| question | 问题内容（可为空） |\n",
    "| reply| 回复内容 |\n",
    "| is_best| 是否为页面上显示的最佳回答 |"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>question</th>\n",
       "      <th>reply</th>\n",
       "      <th>is_best</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>6733</th>\n",
       "      <td>五险两金和五险一金有什么区别</td>\n",
       "      <td>单位招聘，独立待遇中有一项是五险两金。有些单位是五险一金，还有些五险两金。然而我刚毕业小白，...</td>\n",
       "      <td>五险一金是指：医疗保险，生育保险，工伤保险，失业保险和养老保险，还有住房公积金。五险两金指的...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7580</th>\n",
       "      <td>户口不在本地如何办医疗保险</td>\n",
       "      <td>户口不在本地如何办医疗保险</td>\n",
       "      <td>户口不在本地可以办理医保，通常都是以单位名义进行办理。医疗保险分两种办理方式，一种是单位办理...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6310</th>\n",
       "      <td>酒精含量百分之二十八保险公司理赔吗？</td>\n",
       "      <td>NaN</td>\n",
       "      <td>不会赔</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5843</th>\n",
       "      <td>我买的二手车，车险都没过户，怎么交保险</td>\n",
       "      <td>NaN</td>\n",
       "      <td>要看保险合同了，有的是指定被保险人的，如果你出了险，保险公司是不理赔的。建议尽快去过户，或者...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2790</th>\n",
       "      <td>保险买交强险后可加其他险种吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>可以的。车险种类包括：1.交强险，交强险[全称机动车交通事故责任强制保险]是我国首个由国家法...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4301</th>\n",
       "      <td>农村九级伤残赔偿标准我父亲.因矿采煤塌陷至伤残九级应赔多少钱</td>\n",
       "      <td>农村九级伤残赔偿标准我父亲.因矿采煤塌陷至伤残九级应赔多少钱</td>\n",
       "      <td>发生九级伤残的赔偿标准主要包括医疗费用、一次性补偿金等等，具体包括这些：医疗费：以医院发票金...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4685</th>\n",
       "      <td>领着失业金还可以交失业险吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>可以。领取失业金只是说明目前是离职状态，但仍可以居民形式参加保险，但缴纳的只能是医疗保险和养...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7350</th>\n",
       "      <td>车辆上牌照必须在当地上保险吗</td>\n",
       "      <td>车辆上牌照必须在当地上保险吗</td>\n",
       "      <td>不是必须在当地买保险，也可以异地投保，现在很多保险公司开发了异地买汽车保险的购买渠道。但是保...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1611</th>\n",
       "      <td>泰康人寿保险官网产品多不多，能直接在网上买吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>你想买哪方面保险呢，主要是看给你的服务，国寿现在新*市一款你可以考虑下</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5127</th>\n",
       "      <td>车出事故对方全责第三者受伤对方保险应怎样理赔?</td>\n",
       "      <td>NaN</td>\n",
       "      <td>对方的交强险和第三者责任险可以对第三者的伤害进行赔偿。第三者责任险是保险车辆因意外事故致使第...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4743</th>\n",
       "      <td>我主责对方次责,对方摩托车无保险怎么赔付？</td>\n",
       "      <td>我汽车全险有不计免赔，对方摩托车什么都没有。他的车辆损失和医药费是不是由我保险公司出？那我的...</td>\n",
       "      <td>对方无保险需要自费赔付损失。一般在机动车与机动车之间发生交通事故，由保险公司在机动车第三者责...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5729</th>\n",
       "      <td>网上买健康保险不用检查身体吗</td>\n",
       "      <td>我想在慧择网买一款险种，保大病的，但是有个疑问就是，如果不用确认我身体健康就能入保的话，这样...</td>\n",
       "      <td>通常普通的健康保险是不需要体检的，不过如果年龄、保额超过保险公司规定的限度，就一定需要体检。...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3564</th>\n",
       "      <td>招商信诺儿童险如何投保？</td>\n",
       "      <td>NaN</td>\n",
       "      <td>儿童保险是指用于解决其成长过程中所需要的教育、创业、婚嫁等费用，以及应付孩子可能面临的疾病、...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>824</th>\n",
       "      <td>医疗保险请问单位交的医疗保险到底有啥用–手机爱问</td>\n",
       "      <td>NaN</td>\n",
       "      <td>直接到当地社保处办理就可以了</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4856</th>\n",
       "      <td>以前办理过养老金，在交要身份证吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>第二次办理养老保险需要的资料1.本地人才市场《劳动保障事物代理委托协议书》2.身份正原件及复...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2054</th>\n",
       "      <td>江*车可以在防城港买保险吗?</td>\n",
       "      <td>江*车可以在防城港买保险吗?</td>\n",
       "      <td>理论上说是可行的。具体要看各地的政策和监管要求是如何运行，不同的城市对异地投保的情况的规定是...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1415</th>\n",
       "      <td>中英人寿户外保险好吗？有什么好处</td>\n",
       "      <td>NaN</td>\n",
       "      <td>建议直接拨打人寿客服电话咨询</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5225</th>\n",
       "      <td>机动车保险到期多少日内免于处罚</td>\n",
       "      <td>NaN</td>\n",
       "      <td>机动车保险到期就等于无保险，机动车交通事故责任强制保险条例第三十九条：机动车所有人、管理人未...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5596</th>\n",
       "      <td>上学放学途中发生意外，学校购买的意外保险，可以理赔吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>那要看你们学校买的意外保险的条款中有没有限定只负责理赔在校园中发生的意外伤害，如果没有这样的...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7390</th>\n",
       "      <td>办建筑工人意外险需要交什么证件</td>\n",
       "      <td>NaN</td>\n",
       "      <td>需要提供工人的身份证号需要提供建筑公司的组织机构代码证团体意外险投保书填写及盖章一、企业施工...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                               title  \\\n",
       "6733                  五险两金和五险一金有什么区别   \n",
       "7580                   户口不在本地如何办医疗保险   \n",
       "6310              酒精含量百分之二十八保险公司理赔吗？   \n",
       "5843             我买的二手车，车险都没过户，怎么交保险   \n",
       "2790                  保险买交强险后可加其他险种吗   \n",
       "4301  农村九级伤残赔偿标准我父亲.因矿采煤塌陷至伤残九级应赔多少钱   \n",
       "4685                   领着失业金还可以交失业险吗   \n",
       "7350                  车辆上牌照必须在当地上保险吗   \n",
       "1611          泰康人寿保险官网产品多不多，能直接在网上买吗   \n",
       "5127         车出事故对方全责第三者受伤对方保险应怎样理赔?   \n",
       "4743           我主责对方次责,对方摩托车无保险怎么赔付？   \n",
       "5729                  网上买健康保险不用检查身体吗   \n",
       "3564                    招商信诺儿童险如何投保？   \n",
       "824         医疗保险请问单位交的医疗保险到底有啥用–手机爱问   \n",
       "4856                以前办理过养老金，在交要身份证吗   \n",
       "2054                  江*车可以在防城港买保险吗?   \n",
       "1415                中英人寿户外保险好吗？有什么好处   \n",
       "5225                 机动车保险到期多少日内免于处罚   \n",
       "5596      上学放学途中发生意外，学校购买的意外保险，可以理赔吗   \n",
       "7390                 办建筑工人意外险需要交什么证件   \n",
       "\n",
       "                                               question  \\\n",
       "6733  单位招聘，独立待遇中有一项是五险两金。有些单位是五险一金，还有些五险两金。然而我刚毕业小白，...   \n",
       "7580                                      户口不在本地如何办医疗保险   \n",
       "6310                                                NaN   \n",
       "5843                                                NaN   \n",
       "2790                                                NaN   \n",
       "4301                     农村九级伤残赔偿标准我父亲.因矿采煤塌陷至伤残九级应赔多少钱   \n",
       "4685                                                NaN   \n",
       "7350                                     车辆上牌照必须在当地上保险吗   \n",
       "1611                                                NaN   \n",
       "5127                                                NaN   \n",
       "4743  我汽车全险有不计免赔，对方摩托车什么都没有。他的车辆损失和医药费是不是由我保险公司出？那我的...   \n",
       "5729  我想在慧择网买一款险种，保大病的，但是有个疑问就是，如果不用确认我身体健康就能入保的话，这样...   \n",
       "3564                                                NaN   \n",
       "824                                                 NaN   \n",
       "4856                                                NaN   \n",
       "2054                                     江*车可以在防城港买保险吗?   \n",
       "1415                                                NaN   \n",
       "5225                                                NaN   \n",
       "5596                                                NaN   \n",
       "7390                                                NaN   \n",
       "\n",
       "                                                  reply  is_best  \n",
       "6733  五险一金是指：医疗保险，生育保险，工伤保险，失业保险和养老保险，还有住房公积金。五险两金指的...        0  \n",
       "7580  户口不在本地可以办理医保，通常都是以单位名义进行办理。医疗保险分两种办理方式，一种是单位办理...        1  \n",
       "6310                                                不会赔        0  \n",
       "5843  要看保险合同了，有的是指定被保险人的，如果你出了险，保险公司是不理赔的。建议尽快去过户，或者...        0  \n",
       "2790  可以的。车险种类包括：1.交强险，交强险[全称机动车交通事故责任强制保险]是我国首个由国家法...        1  \n",
       "4301  发生九级伤残的赔偿标准主要包括医疗费用、一次性补偿金等等，具体包括这些：医疗费：以医院发票金...        1  \n",
       "4685  可以。领取失业金只是说明目前是离职状态，但仍可以居民形式参加保险，但缴纳的只能是医疗保险和养...        1  \n",
       "7350  不是必须在当地买保险，也可以异地投保，现在很多保险公司开发了异地买汽车保险的购买渠道。但是保...        0  \n",
       "1611                你想买哪方面保险呢，主要是看给你的服务，国寿现在新*市一款你可以考虑下        0  \n",
       "5127  对方的交强险和第三者责任险可以对第三者的伤害进行赔偿。第三者责任险是保险车辆因意外事故致使第...        1  \n",
       "4743  对方无保险需要自费赔付损失。一般在机动车与机动车之间发生交通事故，由保险公司在机动车第三者责...        1  \n",
       "5729  通常普通的健康保险是不需要体检的，不过如果年龄、保额超过保险公司规定的限度，就一定需要体检。...        1  \n",
       "3564  儿童保险是指用于解决其成长过程中所需要的教育、创业、婚嫁等费用，以及应付孩子可能面临的疾病、...        1  \n",
       "824                                      直接到当地社保处办理就可以了        0  \n",
       "4856  第二次办理养老保险需要的资料1.本地人才市场《劳动保障事物代理委托协议书》2.身份正原件及复...        1  \n",
       "2054  理论上说是可行的。具体要看各地的政策和监管要求是如何运行，不同的城市对异地投保的情况的规定是...        1  \n",
       "1415                                     建议直接拨打人寿客服电话咨询        0  \n",
       "5225  机动车保险到期就等于无保险，机动车交通事故责任强制保险条例第三十九条：机动车所有人、管理人未...        1  \n",
       "5596  那要看你们学校买的意外保险的条款中有没有限定只负责理赔在校园中发生的意外伤害，如果没有这样的...        0  \n",
       "7390  需要提供工人的身份证号需要提供建筑公司的组织机构代码证团体意外险投保书填写及盖章一、企业施工...        0  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd_all.sample(n=20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
